﻿@using System.linq;

@{
    ViewBag.Title = "雪茄 | 大卫杜夫 | 雪茄";
    var list = ViewBag.ProductTypeList;

    List<string> themeYellow = new List<string> { "selections", "ding-zhi-ban" };
    List<string> themeBlack = new List<string> { "mao-xian-fa-xian" };

}

<div class="main_cont cigars_mainbox">
    <div id="wp">
        @for (int i = 0; i < list.Count; i++)
        {
            var sectionClass = "";
            if (themeYellow.Contains(list[i].PD_TYPE_URL)) {
                sectionClass = "section_yellow";
            } else if (themeBlack.Contains(list[i].PD_TYPE_URL)) {
                sectionClass = "section_black";
            }
            sectionClass += $" cigar-{list[i].PD_TYPE_URL}";
            <section id="cigar-@i" class="@sectionClass">
                <div class="page_wrapper">
                    <div class="txtline">
                        <h1>@list[i].label</h1>
                        <p>@list[i].PD_TYPE_REMARK</p>
                    </div>
                    <div class="row">
                        @foreach (var children in list[i].children)
                        {
                            if (string.IsNullOrEmpty(children.PD_TYPE_URL))
                            {
                                children.PD_TYPE_URL = children.id;
                            }


                            if (!string.IsNullOrEmpty(children.IMG_URL))
                            {
                                    <div class="col-sm-12 col-md-6 col-lg-6 col-xl-6 @children.PD_TYPE_URL">
                                    <div class="trade-box-item">
                                    @if (!string.IsNullOrEmpty(children.PAGE_LINK))
                                    {
                                        <a href="@children.PAGE_LINK" class="itembox">
                                            <div class="item-thumb-wrapper"
                                                style="background-image: url(@children.IMG_URL);">
                                                <img src="/Content/static/images/placeholder-705x410.png" />
                                                <img class="seo-only" src="@children.IMG_URL" alt="@children.label" data-mark="1.1">
                                            </div>
                                            <div class="item_mask"></div>
                                            <div class="itemtxtbox">
                                                <div class="item-title">@children.label</div>
                                                <div class="item-text">
                                                    <p>@children.PD_TYPE_REMARK</p>
                                                    <div style="margin-top:10px">查看详情 ›</div>
                                                </div>

                                            </div>
                                        </a>
                                    }
                                    else
                                    {
                                        <a href="/product/Index/@children.PD_TYPE_URL" class="itembox">
                                            <div class="item-thumb-wrapper"
                                                style="background-image: url(@children.IMG_URL);">
                                                <img src="/Content/static/images/placeholder-705x410.png" />
                                                <img class="seo-only" src="@children.IMG_URL" alt="@children.label" data-mark="1.2">
                                            </div>
                                            <div class="item_mask"></div>
                                            <div class="itemtxtbox">
                                                <div class="item-title">@children.label</div>
                                                <div class="item-text">
                                                    <p>@children.PD_TYPE_REMARK</p>
                                                    <div style="margin-top:10px">查看详情 ›</div>
                                                </div>

                                            </div>
                                        </a>
                                    }
                                    </div>
                                </div>
                            }
                        }
                        <!-- trade-box-item -->
                    </div>
                </div>
            </section>
        }
    </div>
    <section>
        <div class="page_wrapper">
            <div class="kv kvprd">
                <img src="/Content/static/images/kv3.jpg">
                <div class="txtbox">
                    <b>购买</b>
                    <p>自1911年以来，日内瓦大卫杜夫旗舰店是那些渴望精致手工制作的雪茄、奢侈配饰和精致礼品的人们首选目的地。</p>

                    <a href="/map/" class="btn_yellow">临近店铺</a>
                </div>

            </div>
        </div>
    </section>
</div>

